package com.xinyue.auto.reader;

import com.xinyue.auto.bean.Entity;
import com.xinyue.auto.exception.ExceptionInfo;
import com.xinyue.auto.util.ListWrapper;

public class ParamHolder {
	private ParamHolder() {
	}
	private static class SingletonHolder{
        private static ParamHolder instance = new ParamHolder();  
    }
	/**
	 * 获得对象实例(单例模式)
	 * @return
	 */
	public static ParamHolder getInstance() {
		return SingletonHolder.instance;
	}
	
	//异常提示信息
	private ExceptionInfo exception = new ExceptionInfo();
	//import文件路径集合
	private ListWrapper beanImpt;
	private ListWrapper daoImpt;
	private ListWrapper daoImptExt;
	
	private String basePkg;
	
	private Entity entity;
	
	/**
	 * 刷新对象数据
	 */
	public void refresh(String basePkg) {
		exception.refresh();
		
		beanImpt = new ListWrapper();
		daoImpt = new ListWrapper();
		daoImptExt = new ListWrapper();
		
		entity = null;

		this.basePkg = basePkg;
	}
	
	//getter setter
	public ListWrapper getBeanImpt() {
		return beanImpt;
	}
	public void setBeanImpt(ListWrapper beanImpt) {
		this.beanImpt = beanImpt;
	}
	public ExceptionInfo getException() {
		return exception;
	}
	public void setException(ExceptionInfo exception) {
		this.exception = exception;
	}
	public ListWrapper getDaoImpt() {
		return daoImpt;
	}
	public void setDaoImpt(ListWrapper daoImpt) {
		this.daoImpt = daoImpt;
	}
	public ListWrapper getDaoImptExt() {
		return daoImptExt;
	}
	public void setDaoImptExt(ListWrapper daoImptExt) {
		this.daoImptExt = daoImptExt;
	}
	public Entity getEntity() {
		return entity;
	}
	public void setEntity(Entity entity) {
		this.entity = entity;
	}
	public String getBasePkg() {
		return basePkg;
	}
	public void setBasePkg(String basePkg) {
		this.basePkg = basePkg;
	}
}
